package com.dong.jdk8.generic.type;

/**
 * 更好的类型推测机制
 * Created by jianyang206881 on 2017/9/25.
 */
public class GenericType<T> {
    public static <T> T defaultValue() {
        return null;
    }

    public T getValue(T value, T defaultValue) {
        return (value != null) ? value : defaultValue;
    }
}
